<template>
    <el-dialog
        class="dialog"
        :destroy-on-close="true"
        title="住户审核"
        :visible.sync="isShow"
        :close-on-click-modal="false"
        @close="onDialogClose"
    >
        <el-form
            ref="form"
            label-width="auto"
            class="form"
            :model="formData"
            :rules="rules"
        >
            <el-form-item label="姓名">
                <el-input
                    v-model="formData.member_xm"
                    placeholder="请输入姓名"
                    maxlength="20"
                    disabled
                ></el-input>
            </el-form-item>
            <el-form-item label="身份证号">
                <el-input
                    v-model="formData.id_num"
                    placeholder="请输入身份证号"
                    disabled
                ></el-input>
            </el-form-item>
           
           
            <el-form-item label="审核结果">
                <el-select
                    v-model="formData.status"
                    placeholder="请选择审核结果"
                >
                    <el-option
                        v-for="item in statusData"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    ></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="备注:" prop="remark">
                <el-input
                    type="textarea"
                    placeholder="请输入备注"
                    v-model="formData.remark"
                    clearable
                    resize="none"
                    maxlength="50"
                    :autosize="{ minRows: 2, maxRows: 4 }"
                ></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="onDialogClose">取消</el-button>
            <el-button type="primary" @click="onSubmit">确认</el-button>
        </div>
    </el-dialog>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { Action } from "vuex-class";
import { mixinDialogForm } from "@/mixin/dialog/Form";
@Component({
    mixins: [mixinDialogForm]
})
export default class parkTenantAudit extends Vue {
    // 编辑
    @Action("parkTenantaudit/audit") itemEdit: any;
    // 居住身份

    editInit(data: any) {
        const me = this as any;
        data.status = "";
        me.formData = Object.assign({}, me.formData, data);
    }

    // 表单数据
    formData: any = {
        audit_sn: "",
        status: "",
        remark: ""
    };

    statusData: any = [
        { value: "2", label: "通过审核" },
        { value: "3", label: "审核不通过" }
    ];
    /**
     * 校验配置
     *
     * @type {*}
     * @memberof mixinViewRules
     */
    rules: any = {
        status: [
            {
                required: true,
                message: "请选择审核结果",
                trigger: "blur"
            }
        ]
    };
}
</script>
